<?php
/**
 * Created by PhpStorm.
 * User: kaikaic
 * Date: 2018/10/30
 * Time: 17:20
 */

namespace app\psy\service;

use service\BasicService;
use think\Db;

class OrganizationService extends BasicService {

    public function init() {
        $this->dataTable = ['PsyOrganization'];
    }

    /**
     * 当前排序最大值,新纪录自动+1
     */
    public function getMaxSort($tableIndex=0) {
        return Db::name($this->dataTable[$tableIndex])->max('sort');
    }
}

